const express = require("express");

const expressJoi = require("@escook/express-joi");

const router = express.Router();

const orderHandler = require("../router_handler/order")

const { set_order_schema, update_state_schema } = require("../schema/order")

// 添加订单路由
router.post("/addOrder", expressJoi(set_order_schema), orderHandler.addOrder);

// 获取订单数据路由
router.get("/getOrder", orderHandler.getOrder);

// 修改订单状态路由
router.post("/upState", expressJoi(update_state_schema), orderHandler.upState);

module.exports = router;